package com.celeritymq.producer;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.Queue;
import javax.jms.QueueSender;

import com.celeritymq.destination.CelerityQueue;
import com.celeritymq.message.CelerityMessage;
import com.celeritymq.session.CelerityQueueSession;

public class CelerityQueueSender extends CelerityMessageProducer implements QueueSender {
	private CelerityQueue queue;
	private CelerityQueueSession session;

	public CelerityQueueSender(Queue queue) {
		this.queue = (CelerityQueue) queue;
	}

	@Override
	public Queue getQueue() throws JMSException {
		return queue;
	}

	@Override
	public void send(Message message) throws JMSException {
		send(queue, message);
	}

	@Override
	public void send(Queue queue, Message message) throws JMSException {
		session.putMessage((CelerityQueue) queue, (CelerityMessage) message);
	}

	@Override
	public void send(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {

	}

	@Override
	public void send(Queue queue, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {

	}

}
